//
// Created by wze-zero on 2024/7/15 015.
//
#include <iostream>
#include <cstring>

using namespace std;

int main() {
    char str[100];
    char substr[100];
    cin.getline(str, sizeof(str));
    cin.getline(substr, sizeof(substr));
    int count = 0;
    for (int i = 0, j = 0; i < strlen(str); ++i) {
        if (str[i] == substr[j] && j < strlen(substr) - 1) {
            ++j;
        } else if (j == strlen(substr) - 1) {
            ++count;
            j = 0;
            --i;
        } else {
            j = 0;
        }
    }
    cout << count << endl;
    return 0;
}